<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:p="http://primefaces.org/ui">
	  
<f:view locale="#{switcher.currentLocale}">	  

<h:head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">

</script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

<style type="text/css">  
           .ui-widget {  
               font-size: 15px !important;  
           }  
</style>
  
       
<title>#{msg.listaAgendamentos}</title>

	<ui:include src="/layout/Header.xhtml" />
</h:head>

<h:body>
	<ui:include src="/layout/SubMenu_Agendamentos.xhtml" />
<h:form>
<center>

	<div style="width:75%">
	<p:dataTable var="a" value="#{listaAgenda}">
	    <f:facet name="header">
           #{msg.agendamentos}
       	 </f:facet>
	    <p:column headerText="#{msg.data}" style="width:9%">
	        <h:outputText value="#{a.data}" >
	        	<f:convertDateTime pattern="dd/MM/yyyy" />
	        </h:outputText>
	    </p:column> 
	    
	    <p:column headerText="#{msg.valor}" style="width:12%">
	        R$ <h:outputText value="#{a.valor}" >
	        	<f:convertNumber minFractionDigits="2" />
	        </h:outputText>
	    </p:column>
	 
	    <p:column headerText="#{msg.tipoAgenda}">	    
	        <h:outputText value="#{a.tipoAgendamento}" />
	    </p:column>	    
	    
	    <p:column headerText="#{msg.descricao}">
	        <h:outputText value="#{a.descricao}" />
	    </p:column>
	    
	    <p:column style="width:8%">
	    	<h:commandLink id="alterar" value="#{msg.alterar}" action="#{agendamentoManagedBean.alterarAgendamento}" >
				<f:setPropertyActionListener target="#{agendamentoManagedBean.a}" value="#{a}"/>
			</h:commandLink>	
	    </p:column>
	    
	    <p:column style="width:8%">
	   	 	<h:commandLink id="excluir" value="#{msg.excluir}" onclick="return confirm('#{msg.confirmDeleteAgendamento}')" action="#{agendamentoManagedBean.excluir}" >
				<f:setPropertyActionListener target="#{agendamentoManagedBean.a}" value="#{a}"/>
			</h:commandLink>	
	    </p:column>
	</p:dataTable>
	</div>
	
	<br/><br/><br/> 	
	*#{msg.clickToTransf}
	
</center>	
</h:form>
</h:body>
</f:view>
</html>